import request from './request'

export default {
  // 登录
  login: (params) =>
    request.post('/remote1/lottery/user/login', params, {
      ['Content-Type']: 'multipart/form-data',
    }),

  // 注册
  register: (params) => request.post('/remote1/lottery/user/register', params),

  // 获取钱包余额
  getAmount: (params) =>
    request.get(
      `/remote2/cosmos/bank/v1beta1/balances/${params.fromAddress}/by_denom?denom=uplugcn`
    ),

  // 获取配置项
  getConfig: (params) => request.get('/remote1/lottery/config', params),

  // 获取下单明细（单双大小）
  getPlay1OrderList: (params) =>
    request.get('/remote1/lottery/order/page', params),

  // 获取市场规划
  getMarketRule: (params) =>
    request.get('/remote1/lottery/teamPromotionRule/list', params),

  // 获取市场业绩
  getMarketStat: (params) =>
    request.get('/remote1/lottery/user/performance/stat', params),

  // 获取每日业绩
  getMarketStatDay: (params) =>
    request.get(
      '/remote1/lottery/order/user/historyMarketPerformance/stat',
      params
    ),

  // 获取市场下级
  getMarketList: (params) =>
    request.get('/remote1/lottery/user/child/performance/stat', params),

  // 市场业绩提现
  withdrawMarketStat: (params) =>
    request.post('/remote1/lottery/user/withdrawal', params),

  // 获取市场业绩提现记录
  getMarketWithdraw: (params) =>
    request.get('/remote1/lottery/user/withdrawal/list', params),

  // 获取活动奖池规则
  getActRule: (params) => request.get('/remote1/lottery/rewardRule', params),

  // 获取每日排名（下单）
  getRankList1: (params) =>
    request.get('/remote1/lottery/user/order/rank', params),

  // 获取每日排名（推荐）
  getRankList2: (params) =>
    request.get('/remote1/lottery/user/promotion/rank', params),
}
